\chapter{Requirements from the set A}
\section{Process handling}

\subsection*{Process states}
\textbf{Status:} done

The state is part of the PCB. There are several states in our system like running, ready, blocked, delayed, zombie and so on. Processes can be blocked or delayed by being put out of the ready queue and given the correct state.

\subsection*{Process priorities}
\textbf{Status:} done

The priority is also part of the PCB. It is used to choose the next process to run. In PORN-OS' default settings, there are 42 priority levels (from 1, highest, to 42, lowest).

\subsection*{Process scheduling}
\textbf{Status:} done

The scheduling is done according to the specifications. It is highest priority first using round robin to manage ties. The scheduler checks if a new process should execute each time quantum (even if the round robin mode is not activated).

\subsection*{Process identities}
\textbf{Status:} done

Each process has a unique numeric ID called PID. The processes list is sorted by PID. 

\subsection*{Process creation}
\textbf{Status:} done

Processes can be created either by the user programs (using the system call \textit{fourchette}) or by the OS itself. The new process executes a given code and its pid is returned to its parent. If the creation is not possible, it returns a negative code.

\subsection*{Process termination}
\textbf{Status:} done
	
Processes can terminate themselves with \textit{quitter} or others with \textit{tuer}. The OS can also do so (without using the API, of course). A terminated process becomes a zombie until its parent reads the return value. The PCB is only deallocated after that moment.

\subsection*{Program and processes}
\textbf{Status:} done

Each program is associated with a numerical ID. This ID is registered in the PCB. So, it is possible to know which program a process executes.

\subsection*{Process information}
\textbf{Status:} done

A process can request the information of another process through the use of the API. It can then know pretty much everything of interest about the target (program being run, priority, parent, state ...).

\subsection*{Process recycling}
\textbf{Status:} done

When a process terminates, everything is has allocated is freed. The system then tries to give the return value to its parent (if any). If this is not possible, the PCB remains in the system as a zombie. Otherwise, it is freed. 

\subsection*{Process limitations}
\textbf{Status:} done

In our system, there is no need for limiting the number of processes. PID are recycled as required.
